/*
 *  ostream.h
 *  FrostOS
 *
 *  Created by Alex on 12/4/09.
 *  Copyright 2009 HVS (Hacking vs. Security) and © bluechill. All rights reserved.
 *
 */

#ifndef __OSTREAM_H__
#define __OSTREAM_H__

#include <Video.h>
#include <string.h>

namespace std
{
	//---------------OStream:------------------------
	
	const char endl = '\n';
	extern bool error;
	
	class OStream : public Video
	{
	public:
		OStream& operator<<(char *cp);
		OStream& operator<<(const char *cp);
		OStream& operator<<(char c);
		OStream& operator<<(unsigned char *cq);
		OStream& operator<<(unsigned char c1);
		OStream& operator<<(int n);
		OStream& operator<<(unsigned int n);
		OStream& operator<<(unsigned long l);
		OStream& operator<<(long l);
		OStream& operator<<(string str);
	private:
	};
	
	class OStreamError : public OStream
	{
	public:
		OStreamError& operator<<(char *cp);
		OStreamError& operator<<(const char *cp);
		OStreamError& operator<<(char c);
		OStreamError& operator<<(unsigned char *cq);
		OStreamError& operator<<(unsigned char c1);
		OStreamError& operator<<(int n);
		OStreamError& operator<<(unsigned int n);
		OStreamError& operator<<(unsigned long l);
		OStreamError& operator<<(long l);
	private:
	};
	
	extern OStream cout;
	extern OStreamError cerr;
	
	void itoa (char *buf, int base, int d);
}

#endif
